{%extends "base.html"%}
{%block title%}{{request.session.userinfo.username}}{%endblock%}
{%block sideleft%}{%include "sideleft.html"%}{%endblock%}
{%block content%}
<!--登录成功以后的内容-->
<script type="text/javascript">

</script>
<div class="accounts">
	<h1>{{request.session.userinfo.username}}的帐号</h1>
	<div id='self_nav'>
		<ul>
			<li><a href="/accounts/">个人信息</a></li>
			<li class='current'><a href="/accounts/changepassword/">修改密码</a></li>
			<li><a href="/accounts/friends/">朋友们</a></li>
		</ul>
	</div>
	<div class="clearer"></div>
	<div id='self_info'>
		<h2>{%if messages%}
			{%for message in messages%}
				{{message}}
			{%endfor%}
		{%endif%}</h2>
		<form action="/accounts/changepassword/" method="post">{% csrf_token %}
			<table border="0" cellpadding="0" >
				<tr><th>旧密码:</th><td>{{form.initial_password}}</td></tr>
				<tr><th></th><td>{{form.initial_password.errors}}</td></tr>
				<tr><th>新密码:</th><td>{{form.new_password}}</td></tr> 
				<tr><th></th><td>{{form.new_password.errors}}</td></tr>
				<tr><th>新密码:</th><td>{{form.repeat_password}}</td></tr>
				<tr><th></th><td>{{form.repeat_password.errors}}</td></tr>  
				<tr><th></th><td><input type='submit' value='确认修改密码'/></td></tr>		        
		 	</table>
		</form>
	</div>
	<div class="clearer"></div>
</div>

{%endblock%}
{%block sideright%}{%include "sideright.html"%}{%endblock%}